#include <stdio.h>

int fib(int n)
{
	int a = 1;
	int b = 1;
	int c = 2;
	int i = 0;
	
	for(i = 3; i <= n; i++)
	{
		c = a + b;
		a = b;
		b = c;
	}
	return c;
}

int main()
{
	int i = 0;
	int n = 0;
	int a = 1;
	int b = 1;
	int c = 2;
	
	scanf("%d", &n);
	if(n == 1 || n == 2)
	{
		printf("%d ", a);
	}
	else if(n == 3)
	{
		printf("%d ", c);
	}
	else
	{
		printf("%d ", fib(n));
	}
	
	return 0;
}


